home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-02
/
wgt_tp1.zip
/
WGT04.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1992-07-05
|
1KB
|
46 lines
{**************************************************************************
WordUp Graphics Toolkit
Demo File
Color Handling and Load Functions
This file demonstrates the use of some of the color functions available
with WGT.
**************************************************************************}
USES Graph,WGT,CRT;
VAR
grDriver, grMode : INTEGER;
x : INTEGER;
p : PALETTE; { This is a type specific to WGT }
BEGIN
{ Initialize graphics (see demo file #1) }
grDriver := INSTALLUSERDRIVER('VGA256',NIL);
grMode := 0;
INITGRAPH(grDriver,grMode,'c:\tp\bgi');
_ClearDevice(0);
{ First load the demo palette file, then set the palette }
Load_Palette('demo.pal',p);
Set_Palette_Block(0,255,p);
{Now lets draw some diagonal lines with different colors}
For x:=0 to 255 do begin
_setcolor(x);
_line(0,0,x,199);
end;
{Now cycle a group of them until the users hits return}
repeat
color_rotate(100,150,up,p);
until keypressed;
readln;
{ Now close the graphics system }
CLOSEGRAPH;
END.